<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %>
<%@ page import="java.util.Calendar"%>
<script language="JavaScript" src="<%= request.getContextPath() + "/js/calendar6.js" %>"></script>

<script src="<%=request.getContextPath()%>/js/displaytag.js" type="text/javascript"></script>


 
<table width="99%"  border="0" cellpadding="0" cellspacing="0" widtd="100%">
 
  <tr> 
    <td height="25" colspan="12" align="center" class="titulosenblanco"><strong> CRITERIOS DE BUSQUEDA DE TIPOS DE VALORES FLEXIBLES</strong></td>
  </tr>
  
  <tr align="left"> 
     <td height="25" colspan="12" class="titulosenblanco"><table width="99%" border="0" cellpadding="0" cellspacing="0">
		  <tr> 
			
          <td align="right"><html:link page="/admin/newFlexValueType.do"><img src="<%= request.getContextPath() + "/images/b_nuevo.gif" %>" alt="Nuevo" width="22" height="22" border="0"><br>
            <span class="celdaayd">Nuevo Tipo de Valor</span></html:link></td>
		  </tr>
		 <tr> 
           <td>&nbsp;</td>
         </tr>  
      </table></td>		
  </tr>

  
  
  <html:form action="/admin/findFlexValueType.do" focus="flexValueTypeName" method="post" styleId="frmFlexValueType">     
  <input type="hidden" name="search" value="search">
  <tr align="left">
    <td width="100%" align="center"> 
		<table width="70%" border="0" cellpadding="3" cellspacing="3">
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Nombre</strong> 
            </td>
          <td width="61%"><html:text size= "40" styleClass="form" property="flexValueTypeName" maxlength="40" value=""/></td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Aplicacion</strong> 
            </td>
          <td width="61%">
              <html:select styleClass="form" property="applicationContextInternalCode" style="width:215" > 
                  <html:options collection="applicationsList" property="code" labelProperty="name" /> 
              </html:select>
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
       <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Maneja Codigos</strong> 
            </td>
          <td width="61%">
              <select name="flexValueTypeAutomaticCustomCode" class="form">
                  <option value="">Seleccionar</option>  
                  <option value="s">si</option>
                  <option value="n">no</option>
              </select> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>   
        <!--<tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Vigencia</strong> 
            </td>
          <td width="61%">
              <select name="flexValueTypeUse" class="form">
                  <option value="">Seleccionar Vigencia</option>  
                  <option value="s">si</option>
                  <option value="n">no</option>
              </select> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Desde Vigencia</strong> 
            </td>
          <td width="61%">
            <input type="text" size= "40" class="form"  name="flexValueTypeEffectiveFrom" readonly="true" />
              <a href="javascript:effectiveFrom.popup();">
              <img src="<%= request.getContextPath() + "/images/cal.gif" %>" 
              width="16" height="16" border="0" alt="Click para seleccionar la fecha"></a>
            
          </td>
          <td width="10%">&nbsp;</td>
        </tr>

        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Hasta Vigencia</strong> 
            </td>
          <td width="61%">
            <input type="text" size= "40" class="form"  name="flexValueTypeEffectiveUntil" readonly="true" />
              <a href="javascript:effectiveUntil.popup();">
              <img src="<%= request.getContextPath() + "/images/cal.gif" %>" 
              width="16" height="16" border="0" alt="Click para seleccionar la fecha"></a>
            
          </td>
          <td width="10%">&nbsp;</td>
        </tr>-->

        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%"><input type="submit" name="Submit" value="Buscar"> </td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr> 
          <td colspan="4">&nbsp;</td>
        </tr>
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%">&nbsp;</td>
          <td width="10%">&nbsp;</td>
        </tr>
      </table>
	</td>
  </tr>
</html:form> 	
  
<!--<script language="JavaScript">
                       
  var effectiveFrom = new calendar1(document.forms['frmFlexValueType'].elements['flexValueTypeEffectiveFrom'],"-");
  var effectiveUntil = new calendar1(document.forms['frmFlexValueType'].elements['flexValueTypeEffectiveUntil'],"-");

</script> -->  
  
  <tr>
    <td colspan="12" align="left">
      <logic:present name="msg">
        <div align="center"><%=request.getAttribute("msg")%></div>
      </logic:present>
    </td>
  </tr>
		
	<logic:present name="flexValueTypesList"> 
 
  <tr>
    <td>
 
	<%
	  String style = "add";%>
      <display:table name="requestScope.flexValueTypesList"  pagesize="20" requestURI='<%= request.getContextPath() + "/admin/findFlexValueType.do" %>'   id="flexValueTypes"  cellpadding="3" cellspacing="1"  style="width:100%" class="bordestable">
			
			<display:column  headerClass="headerTable"  paramId="flexValueTypeInternalCode" property="flexValueTypeName" paramProperty="flexValueTypeInternalCode" href='<%= request.getContextPath() + "/admin/modifyFlexValueType.do" %>'  title="Nombre" class="Numero"  sortable="true" />

			<display:column headerClass="headerTable" title="Descripcion" property="flexValueTypeDescription" sortable="true" class="Numero" >
			         <bean:write name="flexValueTypes" property="flexValueTypeDescription"  /> 	
			</display:column>		
			<display:column headerClass="headerTable" title="Aplicacion" property="applicationContextName" sortable="true" class="Numero" >
			         <bean:write name="flexValueTypes" property="applicationContextName"  /> 	
			</display:column>		
			<display:column headerClass="headerTable" title="Maneja Codigos" property="flexValueTypeAutomaticCustomCode" sortable="true" class="Numero" >
			         <bean:write name="flexValueTypes" property="flexValueTypeAutomaticCustomCode"  /> 	
			</display:column>					
      <display:column headerClass="headerTable" title="Borrar" class="Numero"   >
          <html:link onclick="return confirm('Esta seguro que desea eliminar el Tipo de Valor Flexible?')" paramId="flexValueTypeInternalCode" paramName="flexValueTypes" paramProperty="flexValueTypeInternalCode" page="/admin/deleteFlexValueType.do">
               <div align="center"><img src="<%= request.getContextPath() + "/images/Delete.gif" %>" width="16" height="16" border="0"></div>
          </html:link>       
			</display:column>	
			
		</display:table>
		</logic:present>
		</td>
  </tr>
  
</table>

